<template>
    <div class="common-dialog" v-if="options">
        <el-dialog :width="options.width" :title="options.title" :close-on-click-modal="options.clickModalClose" :visible.sync="options.isShow" :center="options.isCenter" v-loading="options.isLoading" @close="options.handleDialogClose" @open="options.handleDialogOpen">
            <slot></slot>
            <div slot="footer">
                <el-button size="medium" @click="options.handleCancelClick()">取 消</el-button>
                <el-button size="medium" type="primary" @click="options.handleConfirmClick()">确 定</el-button>
            </div>
        </el-dialog>
    </div>
</template>

<script>
export default {
    name: 'CommonDialog',
    props: {
        options: {
            type: Object,
            required: true,
        }
    },
    data () {
        return {

        }
    }
}
</script>

<style scoped>
</style>
